<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
  <head>
    <html:base />
    
    <title>标签列表</title>
	<script type="text/javascript" src="/dwr/engine.js"></script>
	<script type="text/javascript" src="/dwr/interface/TagAjaxSupport.js"></script>
	<script type="text/javascript">
		function addTag()
		{
			TagAjaxSupport.addTag(document.getElementById('tag').value,{
				callback:function(msg)
				{
					alert(msg);
				}
			});
		}
	</script>
  	<link rel="stylesheet" href="admin.css" type="text/css"></link>
  </head>
  
  <body>
    <table style="width:600px;">
    	<tr>
    		<td width="600">
    			<input type="text" name="tag" id="tag" /><input type="button" value="创建Tag" onclick="javascript:addTag();" />
    		</td>
    	</tr>
    	
    	<logic:notEmpty name="TagData" scope="request">
	    	<logic:iterate id="tag" name="TagData" scope="request">
	    	<tr>
	    		<td>
	    			${tag}
	    		</td>
	    	</tr>
	    	</logic:iterate>
    	</logic:notEmpty>    	
    </table>
  </body>
</html:html>
